<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title>花卉售卖</title>
	<meta name="keywords" content="某某科技有限公司">
	<meta name="description" content="某某科技有限公司">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<link rel="shortcut icon" href="/images/favicon.ico">
	
	<!-- include main css -->
	<link rel="stylesheet" type="text/css" href="/css/slick.css"/>
	<link rel="stylesheet" type="text/css" href="/css/bootstrap.css"/>
	<link rel="stylesheet" type="text/css" href="/css/jquery.mmenu.all.css"/>
	<link rel="stylesheet" type="text/css" href="/css/style.css"/>
	<link rel="stylesheet" type="text/css" href="/css/jquery.mCustomScrollbar.css"/>
	
	<!--[if lt IE 9]>
    <script src="http://apps.bdimg.com/libs/html5shiv/r29/html5.min.js"></script>
    <script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.min.js"></script>

    <![endif]-->


</head>
<body onload="changebtncolor()" >
	<script>
        //到首页
		function tomain() {
			$.ajax({
				url:"/user/index",
				type:"post",
				data:"",
				datatype:"text",
				async:false,
				success:function () {
					window.location.href  = "/user/index";
				},
				error:function () {
					window.location.href="/user/index";
				}
			})
		}
        //到购物车
		function tocart() {
			$.ajax({
				url:"/cart/tocart",
				type:"post",
				data:"",
				datatype:"text",
				async:false,
				success:function () {
					window.location.href = "/cart/tocart";
				},
				error:function () {
					window.location.href="/cart/tocart";
				}
			})
		}
		//进商城
		function toShoppinglv() {
			$.ajax({
				url:"/mall/shopping/0",
				type:"post",
				data:"",
				datatype:"text",
				async:false,
				success:function () {
					window.location.href="/mall/shopping/0";
				},
				error:function () {
					window.location.href="/mall/shopping/0";
				}
			})
		}
		//进商城
		function toShoppinghua() {
			$.ajax({
				url:"/mall/shopping/1",
				type:"post",
				data:"",
				datatype:"text",
				async:false,
				success:function () {
					window.location.href="/mall/shopping/1";
				},
				error:function () {
					window.location.href="/mall/shopping/1";
				}
			})
		}
		//去查看订单
		function toOrders(){
			$.ajax({
				url:"order/myorders",
				type:"post",
				data:"",
				datatype:"text",
				async:false,
				success:function(){
					window.location.href = "/order/myorders";
				},
				error:function () {
					window.location.href = "/order/myorders";

				}
			})
		}
	</script>
<div>
	
	<!--header-->
	<!--header-->
	<header class="header">
		<section class="container naver clearfix">
			<div class="logo pull-left"><a href="index.html" title="花卉销售系统" alt="花卉销售系统"></a></div>
			<nav class="nav pull-left">
				<ul>
					<li ><a onclick="tomain()">首页</a></li>
					<li class="active" ><a onclick="toShoppinglv()">商城</a>
					</li>
					<li><a onclick="tocart()" > 购物车 </a>
					</li>
					<li><a onclick="toOrders()"> 查看订单 </a>
					</li>
				</ul>
			</nav>
			<div class="search pull-left" >
				<img src="/images/search.png"/>
				<input type="text" class="top_search"  value="" />
				<input type="submit" class="top_sub" value="搜索" />
			</div>
			<div class="language pull-right clearfix">

				<span>种植园花卉售卖系统</span>
			</div>
		</section>
	</header>


	<section class="container">
    	<a href="#mmenu" class="phone-nav glyphicon glyphicon-list"></a>
    </section> 
			
	<!--banner-->
	<section class="banner nybanner">
	   <img src="/images/pro-banner.jpg" alt="">
	</section>
	



	<!--移动端  Mmenu-->
	<nav id="mmenu">
		<ul>
			<li><a href="">English</a></li>
			<li><a href="index.html">首 页</a></li>
			<li><a href="brand.html">品牌简介</a>
				<ul>
					<li><a href="brand.html">品牌简介</a></li>
					<li><a href="">企业文化</a></li>
					<li><a href="honor.html">荣誉资质</a></li>
				</ul>
			</li>
			<li><a href="product.html">产品中心</a>
				<ul>
					<li><a href="">婚礼花艺</a>
						<ul>
							<li><a href="">求婚必备</a></li>
							<li><a href="">情人节专属</a></li>
							<li><a href="">其他鲜花</a></li>
						</ul>
					</li>
					<li><a href="product.html">爱情鲜花</a>
						<ul>
							<li><a href="">求婚必备</a></li>
							<li><a href="product.html">情人节专属</a></li>
							<li><a href="">其他鲜花</a></li>
						</ul>
					</li>
					<li><a href="">长辈鲜花</a>
						<ul>
							<li><a href="">求婚必备</a></li>
							<li><a href="">情人节专属</a></li>
							<li><a href="">其他鲜花</a></li>
						</ul>
					</li>
					
				</ul>
			</li>
			<li><a href="case.html">经典案例</a>
				<ul>
					<li><a href="case.html">经典案例</a></li>
					<li><a href="">新增分类</a></li>
				</ul>
			</li>
			<li><a href="flower.html">花之物语</a>
				<ul>
					<li><a href="flower.html">花之物语</a></li>
					<li><a href="">养花知识</a></li>
				</ul>
			</li>
			<li><a href="contact.html">联系我们</a>
				<ul>
					<li><a href="contact.html">联系我们</a></li>
					<li><a href="message.html">在线留言</a></li>
					<li><a href="job.html">人才招聘</a></li>
				</ul>
			</li>
		</ul>
	</nav>	
		
</div>	



<!--内页内容区域-->
<div class="container ny-wrap">
	<div class="pro-title clearfix">
		<span class="pull-left">产品中心</span>

	</div>

    <script type="javascript">
<%--        改变按钮的class--%>
        function changebtncolor() {
            if(${flowerAllList.size() == 0}){
                ${""}
            }
            if(${flowerAllList.size() > 0}){
                if(${flowerAllList[0].type == 0}){
                    document.getElementById("flowerbtn").className="";
                    document.getElementById("lvbtn").className="active";
                }else if(${flowerAllList[0].type == 1}){
                    document.getElementById("flowerbtn").className="active";
                    document.getElementById("lvbtn").className="";
                }
            }
        }

    </script>

	<script type="text/javascript" >
<%--		跳转去页面并且获得花的信息--%>
		function toflowershow(flowerid){
			$.ajax({                     //Ajax提交路径修改方法
				url:"${pageContext.request.contextPath}/flower/fid/"+flowerid,
				type:"post",     //提交的格式
				data:"", //form表单的id
				dataType:"text",     //返回格式
				success:function (){
					window.location.href = "${pageContext.request.contextPath}/flower/fid/"+flowerid;
				},
				error:function (){
					alert("获得商品错误");  //提示
				}
			})
		}

	</script>


	<div class="container love-wrap pro-con">
		<div class="fenlei">
			<a onclick="toShoppinghua()" id="flowerbtn">花束</a>
			<a class="active" onclick="toShoppinglv()" id="lvbtn">绿植</a>
		</div>

		<ul class="clearfix">
			<div class="flow">
				<c:forEach var="flower" items="${flowerAllList}">
					<li style="height: 300px">
						<div class="pic"><a onclick="javascript:return toflowershow('${flower.flowerId}')"><img src="${pageContext.request.contextPath}/flower/getIamges/${flower.flowerId}.jpg" class="vcenter"/></a></div>
						<p><a onclick="javascript:return toflowershow('${flower.flowerId}')">${flower.flowerName}</a><em>¥</em> <span>${flower.price}</span></p>
					</li>
				</c:forEach>
			</div>

		</ul>



	</div>





<!--底部导航-->
<div class="container footer-nav">
	<div class="panel-footer clearfix">
		<div class="footer-left pull-left">
			<ul>
				<li><a href="index.html">首页</a></li>
				<li><a href="brand.html">品牌简介</a></li>
				<li><a href="product.html">产品中心</a></li>
				<li><a href="case.html">经典案例</a></li>
				<li><a href="flower.html">花之物语</a></li>
				<li><a href="contact.html">联系我们</a></li>

			</ul>
		</div>
		<div class="footer-right pull-right">
			<div class="friend">
				友情链接
				<img class="pull-right" src="/images/friends-bg.png" alt="" />
			</div>
			<div class="dropdown">
				<a href="http://www.baidu.com" target="_blank">百度一下，你就知道</a>
			</div>
		</div>
	</div>
	<div class="footer-copy">
		<div class="erweima-wrap"><img src="/" alt="" /></div>
		<div class="footer-hotline">
			<img src="/images/yu.png" alt="" />
			<span>服务热线：<b>XXX</b><em>版权所有<i>©</i>：某某科技有限公司 XXX</em></span>
		</div>
	</div>
</div>





<!--Include Js-->
<script src="http://apps.bdimg.com/libs/jquery/1.8.3/jquery.min.js" type="text/javascript" charset="utf-8"></script>

<!--移动端导航-->
<script src="/js/jquery.mmenu.all.min.js" type="text/javascript" charset="utf-8"></script>

<script src="/js/public.js" type="text/javascript" charset="utf-8"></script>

<!--slick-->
<script src="/js/slick.min.js" type="text/javascript" charset="utf-8"></script>


<!--placeholder-->
<script src="/js/jquery.placeholder.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	$(function(){ $('input, textarea').placeholder(); });
</script>

<!--<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>-->

</body>
</html>
